<div id="sidebar" class="sidebar">
			<ul>	
				<li>
					<h2>Recent Posts</h2>
					<ul>
					{% for entry in blog.recentposts %}
        			<li><a href="/{{entry.link}}">{{entry.title}}</a></li>
        			{%endfor%}
				  </ul>
			    </li>	
				{%if self.show_directory%}		
				<li>
					<h2>Table of contents</h2>
					<ul id="toc" class="toc">
					{%for d in directory %}
					  {{d}}
					{%endfor%}
				  </ul>
			    </li>
			  {%endif%}
				{%if self.show_categories%}
				<li>
					<h2>Categories</h2>
				  <ul>
					 	{%for cate in categories%}
					  <li>	<a href="/category/{{cate.slug}}">{{cate.name}}({{cate.count}})</a></li>
					 	{%endfor%}
				 	</ul>
				</li>
				{%endif%}
				{%if self.show_blogroll%}
				<li>
					<h2>Blog roll</h2>
						<ul>
							{%for link in blogroll%}
							<li><a href="{{link.href}}">{{link.linktext}}</a><span>{{link.href}}</span></li>
							{%endfor%}
						</ul>
				</li>
				{%endif%}
				{%if self.show_recent_comments%}
				<li>
					<h2>Recent Comments</h2>
					<ul>
		        {% for comment in recent_comments %}
		        <li>{{comment.author}} ({{comment.date|datetz:"Y-m-d H:i"}}):<br/>
		        	<a href="/{{comment.entry.link}}#comment-{{comment.key.id}}">
		        		{{comment.shortcontent|cut:"br"|cut:">"|cut:"<"|cut:"/"|cut:"<"}}...
		        	</a> </li>
		        {%endfor%}
        	</ul>
				</li>
				{%endif%}
			</ul>
</div>